package com.sc.nft.service;

import com.sc.nft.entity.MallDrawActivityPrizePoolDetail;
import com.sc.nft.entity.dto.draw.activity.AutoReplenishmentDTO;

import java.util.List;

public interface MallDrawActivityPrizePoolDetailService {

    /**
     * 扣减奖品数量
     *
     * @param id
     * @param count
     * @return
     */
    boolean changePrizeCount(Long id, Integer count, boolean deduct);

    /**
     * 补充库存
     *
     * @param prizeId
     * @param replenishCount
     * @return
     */
    boolean replenishPrizeCount(Long prizeId, int replenishCount);

    boolean changeRemainingPrizeCountAndTotalPrizeCount(Boolean autoReplenishmentEnabled, AutoReplenishmentDTO autoReplenishmentDTO, Long id, Integer count, boolean deduct);

    List<MallDrawActivityPrizePoolDetail> listByIds(List<Long> ids);

    MallDrawActivityPrizePoolDetail getById(Long id);

    List<MallDrawActivityPrizePoolDetail> listByPrizePoolId(Long prizePoolId);

    Boolean update(MallDrawActivityPrizePoolDetail mallDrawActivityPrizePoolDetail);
}
